/* http://tympanus.net/Blueprints/VerticalTimeline/ */
.timeline {
    margin: 0 0 0 40px;
    padding: 0;
    list-style: none;
    position: relative;

    // 产生那一排竖线
    &:before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        width: 6px;
        background: #eee;
        left: 100px;
        margin-left: -30px;
    }

    > li {
        position: relative;
        min-height: 80px;

        .time {
            display: block;
            position: absolute;
            z-index: 4;

            span {
                display: block;
                text-align: right;
                font-weight: 500;

                &:first-child {
                    font-size: 0.9em;
                    color: #666;
                }

                &:last-child {
                    font-size: 1.4em;
                    font-weight: 600;
                    line-height: 1em;
                    margin-top: -5px;
                    color: darken(#666, 10%);
                }
            }
        }

        &:nth-child(odd) .time span:last-child {
            color: darken(#666, 10%);
        }

        .label {
            margin: 0 0 0 16%;
            background: #fff;
            font-size: 1.2em;
            font-weight: 300;
            line-height: 1.4;
            position: relative;
            border-radius: 5px;
            padding-bottom: 0;
            padding-left: 19px;
            padding-top: 25px;
        }

        &:nth-child(odd) .label {
            background: #fff;
        }

        .label {
            li {
                list-style: none;
                font-size: 16px;
                > span {
                    position: absolute;
                    left: -15px;
                }
                > a {
                    color: #777;
                    &:hover {
                        color: #333;
                    }
                }
            }
            h2 {
                margin-top: 0px;
                padding: 0 0 10px 0;
            }
        }

        &:nth-child(odd) .label:after {
            border-right-color: #6cbfee;
        }

        .icon {
            width: 20px;
            height: 20px;
            position: absolute;
            background: #ccc;
            border-radius: 50%;
            box-shadow: 0 0 0 8px #eee;
            left: 14%;
            top: 0;
            margin: 0 0 0 -40px;
            z-index: 3;
        }
    }
}

// 当屏宽不是太小时, 适当地减小一点标签的字号
@media screen and (max-width: 65.375em) {
    .timeline > li .time span:last-child {
        font-size: 1.5em;
    }
}

// 屏宽太小的情况下, 不显示时间线, 显示成一个个的分组
@media screen and (max-width: 47.2em) {
    .timeline {
        margin-top: 0;
        // 时间"线"就没有了
        &:before {
            display: none;
        }

        > li {
            .time {
                width: 100%;
                position: relative;
                padding: 0 0 20px 0;
                left: 10px;

                span {
                    text-align: left;
                }
            }

            .label {
                margin: 0 0 30px 0;
                padding: 1em;
                font-weight: 400;
                font-size: 95%;

                &:after {
                    right: auto;
                    left: 20px;
                    border-right-color: transparent;
                    border-bottom-color: #3594cb;
                    top: -20px;
                }
            }

            &:nth-child(odd) .label:after {
                border-right-color: transparent;
                border-bottom-color: #6cbfee;
            }

            .icon {
                position: relative;
                float: right;
                left: auto;
                margin: -55px 5px 0 0px;
            }
        }
    }
}
